import Login from './views/Login.vue'
import NotFound from './views/404.vue'
import Home from './views/Home.vue'
import Main from './views/admin/Main.vue'
import Meeting_room from './views/admin/Meeting_room.vue'
import Equipment_manage from './views/admin/Equipment_manage.vue'
import Personnel_management from './views/admin/Personnel_management.vue'
import UserMain from './views/user/Main.vue'
import Make_appointment from './views/user/Make_appointment.vue'
import My_appointment from './views/user/My_appointment.vue'
import My_join from './views/user/My_join.vue'

let routes = [
    {
        path: '/login',
        component: Login,
        name: '',
        hidden: true
    },
    {
        path: '/404',
        component: NotFound,
        name: '',
        hidden: true
    },
    /* 前台管理首页 main */
    {
        path: '/',
        component: Home,
        name: '',
        leaf: false,//只有一个节点
        meta: {
            roleId: '1'
        },
        children: [
            {
                path: '/user/main',
                component: UserMain,
                name: '首页',
                iconCls: 'fa fa-home',
            },
            // {
            //     path: '/user/Make_appointment',
            //     component: Make_appointment,
            //     name: '申请预约',
            //     iconCls: 'fa fa-comments-o',
            // },
            {
                path: '/user/My_appointment',
                component: My_appointment,
                name: '已预约',
                iconCls: 'fa fa-send-o',
            },
            // {
            //     path: '/user/My_join',
            //     component: My_join,
            //     name: '我的参与',
            //     iconCls: 'fa fa-users'
            // },


        ]
    },

    /* 后台管理首页 main */
    {
        path: '/',
        component: Home,
        name: '',
        leaf: false,//只有一个节点
        meta: {
            roleId: '2'
        },
       children: [
           {
               path: '/admin/main',
               component: Main,
               name: '首页',
               iconCls: 'fa fa-home',
           },
           {
               path: '/admin/Meeting_room',
               component: Meeting_room,
               name: '会议室管理',
               iconCls: 'fa fa-comments-o',
           },
           {
               path: '/admin/Equipment_manage',
               component: Equipment_manage,
               name: '设备管理',
               iconCls: 'fa fa-cogs',
           },
           {
               path: '/admin/Personnel_management',
               component: Personnel_management,
               name: '人员管理',
               iconCls: 'fa fa-users'
           },
        ]
    },
    {
        path: '*',
        hidden: true,
        redirect: { path: '/404' }
    }
];

export default routes;